//
//  homeTableViewCell.m
//  One Construction
//
//  Created by apple on 2019/9/4.
//  Copyright © 2019 apple. All rights reserved.
//

#import "homeTableViewCell.h"

@implementation homeTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubview:self.headImgView];
        [self.headImgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_offset(10);
            make.top.mas_offset(10);
            make.width.mas_equalTo(125);
              make.height.mas_equalTo(80);
        }];
        
        [self addSubview:self.titleLable];
        [self.titleLable mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.headImgView.mas_right).mas_offset(11);
            make.width.mas_equalTo(215);
            make.height.mas_equalTo(45);
             make.top.mas_offset(10);
        }];
        
        [self addSubview:self.readerImgView];
        [self.readerImgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.headImgView.mas_right).mas_offset(11);
            make.width.mas_equalTo(16);
            make.height.mas_equalTo(10);
            make.top.mas_equalTo(self.titleLable.mas_bottom).mas_offset(15);
            
        }];
        [self addSubview:self.numReaderLable];
        [self.numReaderLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.readerImgView.mas_right).mas_offset(7);
            make.width.mas_equalTo(85);
            make.height.mas_equalTo(10);
    make.top.mas_equalTo(self.titleLable.mas_bottom).mas_offset(15);
        }];
        
        [self addSubview:self.dataImgView];
        [self.dataImgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.numReaderLable.mas_right).mas_offset(10);
        make.width.height.mas_equalTo(14);
    make.top.mas_equalTo(self.titleLable.mas_bottom).mas_offset(15);
       
        
        }];
        
        [self addSubview:self.dataLable];
        [self.dataLable mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.dataImgView.mas_right).mas_offset(7);
            make.width.mas_equalTo(81);
             make.height.mas_equalTo(11);
    make.top.mas_equalTo(self.titleLable.mas_bottom).mas_offset(15);
            
        }];
        
        
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (UIImageView *)headImgView{
    if (!_headImgView) {
        _headImgView = [[UIImageView alloc]init];
        
    }
    return _headImgView;
    
}
-(myLable *)titleLable{
    if (!_titleLable) {
        _titleLable = [[myLable alloc]init];
        [_titleLable setLabletextColor:[UIColor blackColor] Text:nil TextFont:16];
        _titleLable.numberOfLines = 0;
    }
    return _titleLable;
}
-(UIImageView *)readerImgView{
    if (!_readerImgView) {
        _readerImgView = [[UIImageView alloc]init];
    }
    return _readerImgView;
}
-(myLable *)numReaderLable{
    if (!_numReaderLable) {
        _numReaderLable = [[myLable alloc]init];
        [_numReaderLable setLabletextColor: [UIColor colorWithRed:187/255.0 green:187/255.0 blue:187/255.0 alpha:1.0] Text:nil TextFont:12];
        
        
        
    }
    return _numReaderLable;
}
-(UIImageView *)dataImgView{
    if (!_dataImgView) {
        _dataImgView = [[UIImageView alloc]init];
        
   
    }
    return _dataImgView;
}
-(myLable *)dataLable{
    if (!_dataLable) {
        _dataLable = [[myLable alloc]init];
        [_dataLable setLabletextColor:[UIColor colorWithRed:187/255.0 green:187/255.0 blue:187/255.0 alpha:1.0] Text:nil TextFont:14];
    }
    return _dataLable;
}

@end
